Skip to content

test(submit-cves): fix main CI — align missing-URL tests with error-status contract - #99

Merged
manus-use merged 1 commit into
mainfrom
fix/submit-cves-missing-url-test-contract
Jul 6, 2026
Merged

test(submit-cves): fix main CI — align missing-URL tests with error-status contract#99
manus-use merged 1 commit into
mainfrom
fix/submit-cves-missing-url-test-contract

Conversation

@manus-use

Copy link
Copy Markdown
Owner

Problem

main CI is red (Tests (Python 3.11) and Tests (Python 3.12)) after PR #92 and #93 merged. Two tests fail with DID NOT RAISE ValueError:

  • tests/test_submit_cves_and_logger.py::TestSubmitCvesMissingUrl::test_no_url_raises_value_error
  • tests/test_submit_cves_and_logger.py::TestSubmitCvesMissingUrl::test_no_url_error_message_mentions_config_toml

Root cause — a merge collision between two competing PRs

Both merged independently, so the source now follows #93's design while #92's stale tests still assert the removed raise → CI breaks.

Fix

Update the two stale tests to assert the current, intended contract (error-status dict + config.toml hint in the message), matching the source and the passing sibling tests in test_bug_fixes.py. Also drops the now-unused pytest import (ruff F401).

This is the correct direction: reverting the source would break #93's deliberate design and its passing test suite.

Verification

  • Full suite: 1152 passed + 2 failed → 1154 passed, 3 deselected, 0 failures (Python 3.11 & 3.12)
  • ruff check + ruff format --check clean
  • No source/behavior change — test-only

Two competing PRs (#92, #93) merged with conflicting expectations for
submit_cves() when no webhook URL is configured. PR #93 deliberately moved
URL validation inside the try block so a missing URL returns
{"status": "error"} instead of raising ValueError (see source comment),
and its tests in test_bug_fixes.py assert that contract. PR #92 added
TestSubmitCvesMissingUrl in test_submit_cves_and_logger.py that still expects
the removed `raise ValueError`, breaking main CI (2 failed).

Update the two stale tests to assert the error-status dict contract,
matching the source's documented behavior and the passing sibling tests.
Drop the now-unused pytest import (F401).

Full suite: 1154 passed, ruff clean.
@manus-use
manus-use merged commit 714f583 into main Jul 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant